<?php
	include 'connect.php';
    if (is_numeric($_GET['com_id'])) { 
        $com_id = $_GET['com_id'];
        $com_text = mysql_real_escape_string(htmlspecialchars($_POST['com_text']));
        mysql_query("UPDATE commenti SET com_text='$com_text' WHERE com_id='$com_id'") or die(mysql_error()); 
        echo '<script language=javascript>document.location.href="./../index.php"</script>';
    }
?>